<div class="main_header">
    <div class="header">    
        <a class="logo" href="<?php if($menu_active != "home") : ?><?php echo base; ?><?php else: ?>#<?php endif; ?>"><img src="<?php echo base; ?>images/logo.png" alt="logo"/></a>
        <a class="sp_mau" href="#" ><img src="<?php echo base; ?>images/sp_header.png" /></a>
        <!--<div class="slogan">
            <h1><a href="#">hội nghiên </a></h1>
            <h2><a href="#"><img src="<?php echo base; ?>images/spaner_2.png" alt="logo"/></a></h2>
        </div>-->
        <div class="lang">
        	<?php
				$query_string = $_SERVER["QUERY_STRING"];
				$query_string = preg_replace("/[&]?lang=" . @$_GET["lang"] ."/", "", $query_string);
				$query_string = (!empty($query_string) && strpos($query_string, "&") !== 0) ? "&" . $query_string : $query_string;
				$php_self = $_SERVER["PHP_SELF"];
				if(strpos(base_index, "index.php") === false){
					$php_self = preg_replace("/index[.]php[\/]?/", "", $php_self);
				}
				$linkEn = $php_self."?lang=en";
				$linkVn = $php_self."?lang=vi";
				if(!empty($query_string)){
					$linkEn = $php_self."?lang=en{$query_string}";
					$linkVn = $php_self."?lang=vi{$query_string}";
				}
            ?>
            <a class="vi color_lang" href="<?php echo $linkVn; ?>">Tiếng việt</a>|
            <a class="en color_lang" href="<?php echo $linkEn; ?>">English</a>
        </div>
        <div class="share_link">
        	<?php //facebook button ?>	        
            	<div id="fb-root"></div>
				<script>(function(d, s, id) {
                  var js, fjs = d.getElementsByTagName(s)[0];
                  if (d.getElementById(id)) return;
                  js = d.createElement(s); js.id = id;
                  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=510862795616059";
                  fjs.parentNode.insertBefore(js, fjs);
                }(document, 'script', 'facebook-jssdk'));</script>                
                <div class="fb-like" data-href="http://tramthiennha.com" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>			
			<?php //end facebook button ?>
            <?php //twitter button ?>
            	<style>				
					.share_link #twitter iframe{
						width: 80px !important;
					}					
				</style>
                <span id="twitter">
            	<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://tramthiennha.com">Tweet</a>                
				<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
                </span>
            <?php //end twitter button ?>
            <?php //google button 
			/* ?>
            	<!-- Place this tag where you want the +1 button to render. -->
                <div class="g-plusone" data-size="medium"></div>                
                <!-- Place this tag after the last +1 button tag. -->
				<script type="text/javascript">
                (function() {
                	var po = document.createElement('script'); 
					po.type = 'text/javascript'; 
					po.async = true;
                	po.src = 'https://apis.google.com/js/plusone.js';
                	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
                })();
                </script>
            <?php //end google button /**/ ?>
        </div>
        <div class="clear"></div>
    </div><!--end .header-->

    <div class="clear"></div>
    <div class="menu">
        <ul class="menu_header">                               
            <?php echo $menu_link; ?>         
        </ul>
        
        <div id="form_search" class="search_form" action="" method="get" name="form_search">
        	<form action="<?php echo base_index; ?><?php echo stripUnicode($lang["navi"]["product"]); ?>/<?php echo stripUnicode($lang["general"]["search"]); ?>" method="GET">
          	<input id="keyword" class="search_input" type="text" value="<?php echo $lang["general"]["search"]; ?>..." onblur="if(this.value=='') this.value='<?php echo $lang["general"]["search"]; ?>...';" onfocus="if(this.value=='<?php echo $lang["general"]["search"]; ?>...') this.value='';" name="<?php echo $lang["general"]["keyword"]; ?>">
            <input id="submit_form_search" class="search_btn" type="submit" value="">
            </form>
            <div class="clear_left"></div>
        </div>
    </div><!--end .menu-->
</div><!--end .main_header-->